from pyecharts.charts import Bar
from pyecharts.options import LabelOpts
# 使用Bar构建基础柱状图
bar = Bar()

# 添加xy轴数据
bar.add_xaxis(["China","America","England"])
bar.add_yaxis("GDP",[30,20,10],label_opts=LabelOpts(position="right"))

# 翻转x轴和y轴
bar.reversal_axis()
# 绘图
bar.render("基础柱状图.html")


